//
//  JFBSetting.h
//  com.jufangbian.m
//
//  Created by feynmanyuan on 15/4/17.
//  Copyright (c) 2015年 feynmanyuan. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Utilities)

+ (BOOL)isNilOrEmpty:(NSString *)string;
+ (BOOL)isNilOrEmptyOrWhitespace:(NSString *)string;
+ (NSString *)nonNullString:(NSString *)string;
+ (NSString *)nonEmptyStringOrNil:(NSString *)string;
+ (NSString *)nonEmptyTrimmedStringOrNil:(NSString *)string;
+ (NSString *)newUUIDString;

- (BOOL)contains:(NSString *)substring;
- (NSString *)URLEncodedString;
- (NSString *)URLDecodedString;
- (NSString *)trimmedString;
- (NSNumber *)numberWithString;

- (BOOL)isValidateCarNo;
+ (BOOL)isValidateCarNo:(NSString *)carNo;
- (BOOL)isValidEmail;
- (BOOL)isValidUsername;
- (BOOL)isValidPassword;
- (BOOL)isValidMobileNumber;

-(NSMutableArray *)substringByRegular:(NSString *)regular;
+(NSDecimalNumber *)formatDecimal:(id)value;
+(NSString*)decimalToString:(NSDecimalNumber*)value;
@end
